﻿using BigEgg.Framework.Foundation;
using System.ComponentModel.DataAnnotations;
using UnitTestDemo.Applications.Properties;

namespace UnitTestDemo.Applications.Humans
{
    public class ContactInfo : ValidationModel
    {
        #region Fields
        private string type;
        private string value;
        #endregion

        #region Properties
        public string Type
        {
            get { return this.type; }
            set
            {
                if (this.type != value)
                {
                    this.type = value;
                    RaisePropertyChanged("Type");
                }
            }
        }

        [Required(ErrorMessageResourceName = "ValueMandatory", ErrorMessageResourceType = typeof(Resources))]
        public string Value
        {
            get { return this.value; }
            set
            {
                if (this.value != value)
                {
                    this.value = value;
                    RaisePropertyChanged("Value");
                }
            }
        }
        #endregion
    }
}
